const common = require('./webpack.common')
const { merge } = require('webpack-merge')

module.exports = merge(common, {
  devtool: 'source-map',
  devServer: {
    contentBase: './public',
    hot: true,
    proxy: {
      '/api': {
        target: 'https://api.github.com',
        pathRewrite: {
          '^/api': '',
        },
        changeOrigin: true,
      }
    }
  },
})